<!DOCTYPE html>
<html>

  <head>
	<meta charset="UTF-8">
	<title>Xtend - Xtend 2.7.0 Release Notes</title>
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<meta name="description"
		content="Xtend is a statically typed programming language sitting on top of Java.">
	<meta name="author" content="Sven Efftinge">
	<meta name="author" content="Miro Spoenemann">
	<!--  styles -->
	<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
	<!--[if lt IE 9]>
	  <script src="https://html5shim.googlecode.com/svn/trunk/html5.js"></script>
	<![endif]-->
	
	<!-- Le fav and touch icons -->
	
	<link rel="shortcut icon" href="/Xtext/xtend/images/favicon.png">
	
	<link href="/Xtext/xtend/css/bootstrap.css" rel="stylesheet" type='text/css'>
	<link href="/Xtext/xtend/css/bootstrap-responsive.css" rel="stylesheet" type='text/css'>
	<link href="/Xtext/xtend/css/shield-responsive.css" rel="stylesheet" type='text/css'>
	<link href='/Xtext/xtend/css/fonts.css' rel='stylesheet' type='text/css'>
	<link href="/Xtext/xtend/css/prettyPhoto.css" rel="stylesheet" media="screen" type='text/css'>
	<link href="/Xtext/xtend/css/prettify.css" type="text/css" rel="stylesheet"/>
	<link href="/Xtext/xtend/css/style.css" rel="stylesheet" type='text/css'>
	
	<!--[if lt IE 9]>
	<link href="css/iebugs.css" rel="stylesheet" type='text/css'>
	<![endif]-->

	<!-- BEGIN Cookie Consent
	<link rel="stylesheet" type="text/css" href="//cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.0.3/cookieconsent.min.css" />
	<script src="//cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.0.3/cookieconsent.min.js"></script>
	<script>
	window.addEventListener("load", function(){
	window.cookieconsent.initialise({
		"palette": {
		"popup": {
		  "background": "#000"
		},
		"button": {
		  "background": "#f1d600"
		}
		},
		"theme": "edgeless",
		"type": "opt-in",
		onInitialise: function (status) {
		  var type = this.options.type;
		  var didConsent = this.hasConsented();
		  if (type == 'opt-in' && didConsent) {
		    // TODO: enable cookies
		  }
		  if (type == 'opt-out' && !didConsent) {
		    // TODO: disable cookies
		  }
		},
		onStatusChange: function(status, chosenBefore) {
		  var type = this.options.type;
		  var didConsent = this.hasConsented();
		  if (type == 'opt-in' && didConsent) {
		    // TODO: enable cookies
		  }
		  if (type == 'opt-out' && !didConsent) {
		    // TODO: disable cookies
		  }
		}, 
		onRevokeChoice: function() {
		  var type = this.options.type;
		  if (type == 'opt-in') {
		    // TODO: disable cookies
		  }
		  if (type == 'opt-out') {
		    // TODO: enable cookies
		  }
		},
		"content": {
		"href": "https://www.eclipse.org/legal/privacy.php"
		}
	})});
	</script>
	END Cookie Consent -->
</head>


  <body>

    <!-- Navbar -->
  <div class="navbar navbar-fixed-top"
    style="border-bottom: 1px solid #000;">
    <div class="navbar-inner">
      <div class="container">
        <a class="btn btn-navbar" data-toggle="collapse"
          data-target=".nav-collapse"> <span class="icon-bar"></span> <span
          class="icon-bar"></span> <span class="icon-bar"></span>
        </a> <a class="brand" href="/Xtext/xtend/index.html"></a>
        <div class="nav-collapse collapse" style="height: 0px;">
          <ul class="nav">
            <li ><a href="/Xtext/xtend/download.html">Download</a></li>
            <li ><a href="/Xtext/xtend/documentation/index.html">Documentation</a></li>
            <li ><a href="/Xtext/xtend/community.html">Community</a></li>
            <li ><a href="https://eclipse.dev/Xtext">Xtext</a></li>
            <li ><a href="https://www.eclipse.org">Eclipse.org</a></li>
          </ul>
              <!--div class="btn-group pull-right">
                <div class="g-plusone" data-href="https://eclipse.dev/Xtext/xtend"></div>
              </div-->
        </div>
        <!--/.nav-collapse -->
      </div>
    </div>
  </div>
  <!-- Navbar End -->


    <div class="post">

  <header class="post-header">
    <h1 class="post-title">Xtend 2.7.0 Release Notes</h1>
    <p class="post-meta">Sep 2, 2014</p>
  </header>

  <article class="post-content">
    <p>
  Version 2.7 got many new features, bug fixes and performance improvements (<a href="https://bugs.eclipse.org/bugs/buglist.cgi?bug_status=RESOLVED&bug_status=VERIFIED&bug_status=CLOSED&status_whiteboard=v2.7">full bugzilla list</a>). The most noteworthy changes are the following.
</p>

<section id="xtend_language_2_7" style="padding-top: 68px; margin-top: -68px;">
	<h3>
	   Language
	</h3>
</section>
<section style="padding-top: 68px; margin-top: -68px;">
	<h4>
	   Sugared Lambdas With Zero And More Than Two Arguments
	</h4>
	<p>
	   It is now allowed to leave out parameter declarations for all lambda expressions using a positional syntax, similar to Apple's Swift:
<pre class="prettyprint lang-xtend linenums">
#[1, 2, 3].reduce[$0 + $1]
</pre>
</section>
<section style="padding-top: 68px; margin-top: -68px;">
	<h4>
	   Unqualified Enum Usage
	</h4>
	Enum constants in annotations and switch expressions can be referenced without their type name.
<pre class="prettyprint lang-xtend linenums">
@Retention(RUNTIME)
</pre>
</section>
<section style="padding-top: 68px; margin-top: -68px;">
	<h4>
	   Inner Type of Parameterized Types
	</h4>
	Type inference for parameterized inner classes was improved and supports types like
<pre class="prettyprint lang-xtend linenums">
OuterType&LT;T&GT;.InnerType
</pre>
</section>
<section style="padding-top: 68px; margin-top: -68px;">
	<h4>
	   Deprecated and Dead Code Analysis
	</h4>
	The validator will now detect use of deprecated API and is much better at finding dead code. Would you have spotted the following?
	</p>
	<img class="image_between_p" src="images/releasenotes/2_7_xtend-dead-code-analysis.png"/>
	<img>
</section>
<section id="xtend_library_2_7" style="padding-top: 68px; margin-top: -68px;">
	<h3>
	   Library
	</h3>
	</section>
<section style="padding-top: 68px; margin-top: -68px;">
	<h4>
	   New Extension Methods on Iterables
	</h4>
	<p>
	   The standard library has new extension methods for <code>Iterables</code>, including <code>min</code>/<code>max</code>, <code>groupBy</code> and <code>indexed</code>.
	</p>
<pre class="prettyprint lang-xtend linenums">
#["Xtend", "Java", "Eclipse"].maxBy[length]
</pre>

</section>
<section style="padding-top: 68px; margin-top: -68px;">
	<h4>
	   New Active Annotations
	</h4>
	<p>New Active Annotations have been added to free you of some repetitive tasks. The new <code>@Accessors</code> generates getters and setters, with fine grained control and even for all fields of a class if you want. The <code>@Delegate</code> annotation automatically implements the delegation pattern for you, so you only need to concentrate on methods that you actually want to implement differently than just delegating. Here is an example:</p>
<pre class="prettyprint lang-xtend linenums">
interface I {
def void m1()
def void m2()
def void m3()
}
class A implements I {
override m1() {}
override m2() {}
override m3() {}
}
class B implements I {
//all methods automatically implemented
@Delegate A delegate = new A
}
</pre>
	<p>Other additions include <code>@ToString</code>, <code>@EqualsHashCode</code>, <code>@FinalFieldsConstructor</code> and a new <code>@Data</code> (the old one is now deprecated as well as <code>@Property</code>).</p>
	</section>
<section style="padding-top: 68px; margin-top: -68px;">
	<h4>
	   Active Annotations API Improvements
	</h4>
	<p>The active annotation API integrates even deeper with the IDE. Every generated element can (and should) now declare its source element. This tracing information is used in places like the outline view. A separate validation phase has been added, so the end result after running all transformations can be validated. Also, changes to classes and even arbitrary resources that the annotation processor requested are detected and lead to automatic rebuilds.</p>
</section>
<section style="padding-top: 68px; margin-top: -68px;">
<h3>IDE Features</h3>
</section>
<section id="xtend_debugging_2_7" style="padding-top: 68px; margin-top: -68px;">
	<h4>
	   Debugging
	</h4>
	<p>
	   Xtend breakpoints can now have conditions. Conditions are written in Java, so you get full access even to synthetic variables inserted by the Xtend compiler. Of course you also get content assist in the condition editor.
	</p>
	<img class="image_between_p" src="images/releasenotes/2_7_xtend-conditional-breakpoint.png"/>
	<p>
	   Breakpoints can now be toggled, enabled/disabled and inspected via the ruler context menu.
	</p>
	<img class="image_between_p" src="images/releasenotes/2_7_xtext-breakpoint-toggle.png"/>
</section>
<section style="padding-top: 68px; margin-top: -68px;">
	<h4>
	   Content Assist
	</h4>
	<p>
	   Content Assist has become a lot faster and more accurate at the same time. It will now also retain the "is"-prefix of boolean properties.
	</p>
</section>
<section style="padding-top: 68px; margin-top: -68px;">
	<h4>
	   Performance Improvements
	</h4>
	<p>
	   Performance has reached a new level with big improvements to Content Assist, parallel code generation and lots of fine tuning. Also, Xtend will now cancel jobs (like outline refreshing) when you start typing again, making the editor much more responsive.
	</p>
</section>
<section style="padding-top: 68px; margin-top: -68px;">
	<h4>
	   Outline with Java-Mode
	</h4>
	<p>
	   The outline view now supports two modes: One shows the original Xtend AST, the other one shows the resulting Java AST. This is very useful in the presence of Active Annotations that add a lot of new members to a class.
	</p>
	<img class="image_between_p" src="images/releasenotes/2_7_xtend-outline-normal.png"/>
	<img class="image_between_p" src="images/releasenotes/2_7_xtend-outline-jvm.png"/>
</section>
<section style="padding-top: 68px; margin-top: -68px;">
	<h4>
	   Organize imports on packages
	</h4>
	<p>
	   You can now use "Organize Xtend Imports" on whole packages via the "Source" context menu.
	</p>
	<img class="image_between_p" src="images/releasenotes/2_7_xtend-organize-imports.png"/>
</section>
<section style="padding-top: 68px; margin-top: -68px;">
	<h4>
	   Template proposals support import
	</h4>
	<p>
	   A new type of template variable was added. It adds an import to an Xtend file when the template is inserted. This greatly reduces the need for qualified type names in templates.
	</p>
	<img class="image_between_p" src="images/releasenotes/2_7_xtend-templates-import.png"/>
</section>
<section style="padding-top: 68px; margin-top: -68px;">
	<h4>
	   Open return type
	</h4>
	<p>
	   Ever wondered what you can do with the type of a variable or the return type of a method? You can now CTRL-Click on feature calls and open the declaration of the return type of that call.
	</p>
</section>
<section style="padding-top: 68px; margin-top: -68px;">
	<h4>
	   Show errors from derived Java files
	</h4>
	<p>
	   By using black box Java code within active annotations the generated Java source could sometimes have errors while the Xtend code is fine. In those cases, the errors are now shown at the appropriate locations in Xtend as well.
	</p>
</section>
<section style="padding-top: 68px; margin-top: -68px;">
	<h4>Maven and Java 8</h4>
	<p>
	   The Xtend Maven plugin is now toolchain-aware. Using this, you can for instance run Maven on Java 8, but compile against a JDK 6.
	</p>
</section>

  </article>

</div>

    
    <footer class="site-footer">
  <div id="extra">
    <div class="container inner-footer">
      <div class="row">
        <div class="span6">
          <h3 class="footer-links-header">Quick Links</h3>
          <ul class="footer-links clearfix">
            <li><a href="https://www.eclipse.org/legal/privacy.php">Privacy Policy</a></li>
            <li><a href="https://www.eclipse.org/legal/termsofuse.php">Terms of Use</a></li>
            <li><a href="https://www.eclipse.org/legal/copyright.php">Copyright Agent</a></li>
            <li><a href="https://www.eclipse.org/legal/">Legal</a></li>
          </ul>
          <ul class="footer-links clearfix">
            <li><a href="https://www.eclipse.org">Eclipse Home</a></li>
            <li><a href="https://marketplace.eclipse.org/">Market Place</a></li>
            <li><a href="https://www.planeteclipse.org/">Eclipse Planet</a></li>
            <li><a href="https://www.eclipse.org/forums/index.php/f/27/">Xtext Forum</a></li>
          </ul>
        </div>
        <div class="span6">
            <!-- Social Media Links -->
            <h3 class="footer-links-header"">Social Media</h3>
            <ul class="footer-links clearfix">
              <li>
                <a href="https://twitter.com/xtendlang"><img src="/Xtext/xtend/images/Twitter-bird-darkgray.png" class="img-responsive" style="margin-right: 5px;height: 1em;" alt="Twitter icon">@xtendlang on Twitter</a>
              </li>
            </ul>
          </div>

      </div>
    </div>
  </div>
  <a href="#" class="scrollup fadeOutRight animated" style="display: none;">ScrollUp</a>
  <a href="https://dryicons.com/">Icons by https://dryicons.com</a>
  <!-- Le javascript
      ================================================== -->
  <!-- Placed at the end of the document so the pages load faster -->
  <script src="/Xtext/xtend/js/jquery-1.7.1.min.js" type="text/javascript"></script>
  <script src="/Xtext/xtend/js/bootstrap.min.js" type="text/javascript"></script>
  
  <!-- include pretty-print files -->
  <script src="/Xtext/xtend/js/prettify.js" type="text/javascript" ></script>
  <script src="/Xtext/xtend/js/lang-xtend.js" type="text/javascript"></script>
  
  <!-- Include the plug-in -->
  <script src="/Xtext/xtend/js/jquery.prettyPhoto.js" type="text/javascript"></script>
  <script src="/Xtext/xtend/js/jquery.easing.1.3.js" type="text/javascript"></script>
  <script src="/Xtext/xtend/js/custom.js" type="text/javascript"></script>
  <!--script src="https://apis.google.com/js/platform.js" async defer></script-->
  <!--script type="text/javascript">
    var _gaq = _gaq || [];  
      _gaq.push([ '_setAccount', 'UA-2429174-4' ]);
    _gaq.push([ '_trackPageview' ]);
    (function() {
      var ga = document.createElement('script');
      ga.type = 'text/javascript';
      ga.async = true;
      ga.src = ('https:' == document.location.protocol ? 'https://ssl'
          : 'https://www')
          + '.google-analytics.com/ga.js';
      var s = document.getElementsByTagName('script')[0];
      s.parentNode.insertBefore(ga, s);
    })();
  </script-->
</footer>

  </body>

</html>
